import { translateTitle } from '@/utils/i18n'
const MessageFiledMapping = {
  MessageFiledMapping: {
    search: {
      form: {
        method: 'ApimMessageFieldMappingQuery',
        name: 'search',
        field: [
          {
            type: 'input',
            name: 'MESSAGE_GROUP_ID',
            label: translateTitle('Dams.APIMinterfaceManagement.消息集编号'),
            labelHidden: false,
          },
          {
            type: 'input',
            name: 'MESSAGE_ID',
            label: translateTitle('Dams.APIMinterfaceManagement.接口编号'),
            labelHidden: false,
          },
          {
            type: 'button',
            label: translateTitle('Dams.APIMinterfaceManagement.查询'),
            labelHidden: true,
          },
        ],
      },
    },
    dialog: {
      form: {
        method: '',
        name: 'dialog',
        field: [
          {
            type: 'checkbox',
            name: 'ID',
            label: '',
            hidden: true,
          },
          {
            type: 'input',
            name: 'MESSAGE_GROUP_ID',
            label: translateTitle('Dams.APIMinterfaceManagement.消息集编号'),
            labelHidden: false,
            disabled_edit: true,
            isRules: true,
          },
          {
            type: 'input',
            name: 'MESSAGE_ID',
            label: translateTitle('Dams.APIMinterfaceManagement.接口编号'),
            labelHidden: false,
            disabled_edit: true,
            isRules: true,
          },
          {
            type: 'input',
            name: 'MESSAGE_TYPE',
            label: translateTitle('Dams.APIMinterfaceManagement.消息结构'),
            disabled_edit: true,
            isRules: true,
            labelHidden: false,
          },
          {
            type: 'input',
            name: 'STD_FIELD',
            label: translateTitle('Dams.APIMinterfaceManagement.MONGO字段名'),
            isRules: true,
            labelHidden: false,
          },
          {
            type: 'input',
            name: 'WEB_FIELD',
            label: translateTitle('Dams.APIMinterfaceManagement.目标字段名'),
            isRules: true,
            labelHidden: false,
          },
          {
            type: 'select',
            name: 'ACTIVE_FLAG',
            label: translateTitle('Dams.APIMinterfaceManagement.激活标志'),
            labelHidden: false,
            isRules: true,
            options: [
              {
                LABEL: translateTitle('Dams.APIMinterfaceManagement.是'),
                CODE: 'Y',
              },
              {
                LABEL: translateTitle('Dams.APIMinterfaceManagement.否'),
                CODE: 'N',
              },
            ],
          },
          {
            type: 'input',
            name: 'WEB_DATA_TYPE',
            label: translateTitle('Dams.APIMinterfaceManagement.字段类型'),
            labelHidden: false,
          },
          {
            type: 'input',
            name: 'WEB_DATA_WIDTH',
            label: translateTitle('Dams.APIMinterfaceManagement.字段长度'),
            labelHidden: false,
          },
          {
            type: 'input',
            name: 'WEB_DATA_FORMAT',
            label: translateTitle('Dams.APIMinterfaceManagement.字段格式'),
            labelHidden: false,
          },
          {
            type: 'input',
            name: 'WEB_DEFAULT',
            label: translateTitle('Dams.APIMinterfaceManagement.字段默认值'),
            labelHidden: false,
          },
          {
            type: 'select',
            name: 'KEY_FLAG',
            label: translateTitle('Dams.APIMinterfaceManagement.是否关键字'),
            labelHidden: false,
            options: [
              {
                LABEL: translateTitle('Dams.APIMinterfaceManagement.是'),
                CODE: 'Y',
              },
              {
                LABEL: translateTitle('Dams.APIMinterfaceManagement.否'),
                CODE: 'N',
              },
            ],
          },
          {
            type: 'select',
            name: 'UPDATE_FLAG',
            label: translateTitle('Dams.APIMinterfaceManagement.是否更新'),
            labelHidden: false,
            options: [
              {
                LABEL: translateTitle('Dams.APIMinterfaceManagement.是'),
                CODE: 'Y',
              },
              {
                LABEL: translateTitle('Dams.APIMinterfaceManagement.否'),
                CODE: 'N',
              },
            ],
          },
          {
            type: 'input',
            name: 'ADD_TIME',
            label: translateTitle('Dams.APIMinterfaceManagement.创建时间'),
            hidden: true,
            value: '',
          },
          {
            type: 'input',
            name: 'ADD_WHO',
            label: translateTitle('Dams.APIMinterfaceManagement.创建人'),
            hidden: true,
            value: '',
          },
          {
            type: 'input',
            name: 'EDIT_TIME',
            label: translateTitle('Dams.APIMinterfaceManagement.编辑时间'),
            hidden: true,
            value: '',
          },
          {
            type: 'input',
            name: 'EDIT_WHO',
            label: translateTitle('Dams.APIMinterfaceManagement.编辑人'),
            hidden: true,
            value: '',
          },
          {
            type: 'button',
            label: translateTitle('Dams.APIMinterfaceManagement.提交'),
            labelHidden: true,
            isRules: true,
          },
        ],
      },
    },
    deleteMethod: 'ApimMessageFieldMappingRemove',
    updateMethod: 'ApimMessageFieldMappingUpdate',
    addMethod: 'ApimMessageFieldMappingSava',
    downloadMethod: 'apim.message.field.mapping.export',
  },
}
export default MessageFiledMapping
